package easybooking;

import com.sun.xml.internal.ws.message.saaj.SAAJHeader;
import java.util.*;
import easybooking.data.Airline;
import easybooking.data.AirlineImpl;
import easybooking.data.Airport;
import easybooking.data.AirportImpl;
import easybooking.data.Booking;
import easybooking.data.Customer;
import easybooking.data.Flight;
import easybooking.data.Plane;
import easybooking.data.Seat;
import easybooking.data.Type;
import easybooking.db.AirlineMapper;
import easybooking.db.CustomerMapper;
import easybooking.db.AirportMapper;
import easybooking.db.BookingMapper;
import easybooking.db.FlightMapper;
import easybooking.db.PlaneMapper;
import easybooking.db.SeatMapper;
import easybooking.db.TypeMapper;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;

// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.12190274-1D35-DE7C-6CB7-1E0F893144E7]
// </editor-fold> 
public class FlightManagementImpl extends UnicastRemoteObject implements FlightManagement {

    private BookingMapper bMapper;
    private FlightMapper fMapper;
    private CustomerMapper cMapper;
    private AirportMapper airpMapper;
    private PlaneMapper pMapper;
    private AirlineMapper airlMapper;
    private TypeMapper tMapper;
    private SeatMapper sMapper;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.CC2AD015-38E4-C068-AA06-C134FDA61EDC]
    // </editor-fold> 
    public FlightManagementImpl(BookingMapper b, FlightMapper f, CustomerMapper c, AirportMapper airp, PlaneMapper p, AirlineMapper airl, TypeMapper t, SeatMapper s) throws RemoteException {
        this.bMapper = b;
        this.fMapper = f;
        this.cMapper = c;
        this.airpMapper = airp;
        this.pMapper = p;
        this.airlMapper = airl;
        this.tMapper = t;
        this.sMapper = s;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.BF9DB95E-628D-86DE-3903-1A40E290ABD9]
    // </editor-fold> 
    public Customer createCustomer(String firstname, String lastname, String street, String city, int zip) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1ED5724F-906E-AD32-CD16-0A7E50049A59]
    // </editor-fold> 
    public void deactivate(Customer c) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.95652CC8-A77E-1A57-9AA6-EB19458FD828]
    // </editor-fold> 
    public void save(Customer c) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.9E6AEEEC-BBF3-A75F-EFC8-04AC68AD179C]
    // </editor-fold> 
    public void save(Airline airl) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.337FE309-F794-4F5E-4712-80626FA38FC0]
    // </editor-fold> 
    public void save(Airport airp) throws RemoteException {
        airpMapper.update(airp);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.D21B8896-C48A-19B3-A240-F13207C351AB]
    // </editor-fold> 
    public void save(Booking b) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.00D11F42-F50E-19CB-6CCD-7D21B305AA48]
    // </editor-fold> 
    public void save(Flight f) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4E5085FC-4AC5-9F7F-3D6E-43B58F7A5495]
    // </editor-fold> 
    public void save(Plane p) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.CAB2954C-BA5E-A340-470A-9D424B785503]
    // </editor-fold> 
    public void save(Seat s) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.59716D92-D618-AC19-A0CD-FA25DBAB055A]
    // </editor-fold> 
    public void save(Type t) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4B4358D2-590E-3226-855A-873226649308]
    // </editor-fold> 
    public ArrayList<Customer> getAllCustomers() throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.9A50FC71-5216-16C7-EFD9-DF7AE9CF3473]
    // </editor-fold> 
    public Vector<Airline> getAllAirlines() throws RemoteException {
        return this.airlMapper.findAll();
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.3ED149D6-B862-C5EE-69EE-9B63AA1AC2DD]
    // </editor-fold> 
    public Vector<Airport> getAllAirports() throws RemoteException {
        // Testing
        return this.airpMapper.findAll();
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.32BD3E07-81A1-FB89-008E-5870BC2803AE]
    // </editor-fold> 
    public ArrayList<Booking> getAllBookings() throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.FC18D264-51C9-F73E-4BFF-6C1500F0A06E]
    // </editor-fold> 
    public ArrayList<Flight> getAllFlights() throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.F4407255-8DD6-B3DA-B6D0-82FDF15E6C8B]
    // </editor-fold> 
    public ArrayList<Plane> getAllPlanes() throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.BFA876C4-9465-A4A3-8C51-44B79E10EA17]
    // </editor-fold> 
    public ArrayList<Seat> getAllSeats() throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.7882D536-A7DF-C811-4441-69778277A4F0]
    // </editor-fold> 
    public ArrayList<Type> getAllTypes() throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.20447DC0-D19D-2BB6-AE58-D3F2E2BFBD24]
    // </editor-fold> 
    public Airline createAirline(String name, String initials) throws RemoteException {
        Airline airl = new AirlineImpl();
        airl.setName(name);
        airl.setInitials(initials);
        // Objekt in der DB speichern.
        return this.airlMapper.insert(airl);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0E372EAB-FC57-F384-D2DE-CFE47E244A20]
    // </editor-fold> 
    public Airport createAirport(String name, String initials, String city) throws RemoteException {

        Airport airp = new AirportImpl();
        airp.setName(name);
        airp.setInitials(initials);
        airp.setCity(city);
        System.out.println("Test");
        // Objekt in der DB speichern.
        return this.airpMapper.insert(airp);
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.89271713-B221-84BE-8B48-A6EBE806A3C5]
    // </editor-fold> 
    public Booking createBooking(Date dateTime, int customerId, int flightId, int seatId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.D47D8856-5304-43A7-7206-9B1F2E5FC5EF]
    // </editor-fold> 
    public Flight createFlight(Date dateTime, int planeId, int startAirportId, int stopAirportId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.6A4B073E-2200-2AF0-2DD4-696AA9675F06]
    // </editor-fold> 
    public Plane createPlane(int typeId, int airlineId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.E82252A7-CDDD-DFB8-63BB-4E60D30D0543]
    // </editor-fold> 
    public Seat createSeat(String row, int seat, int planeId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.358E5773-3AEF-1800-9C00-3AF4E74B3735]
    // </editor-fold> 
    public Type createType(String name, int seatsTotal, int rows, int colums) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.EE8841F7-291D-3CD0-AAC5-11D7A371A455]
    // </editor-fold> 
    public void deactivate(Airline airl) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.E6E2E145-7FB2-F3B6-EF49-E59C16DEAAD6]
    // </editor-fold> 
    public void deactivate(Airport airp) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.44EA0B74-186B-0CF1-1DF7-0BC5B4A410A1]
    // </editor-fold> 
    public void deactivate(Booking b) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.1ED8598A-3580-611B-B7E3-BCCE0AA6DA3B]
    // </editor-fold> 
    public void deactivate(Flight f) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.EE253D10-7DC7-6143-DF02-54445060DC54]
    // </editor-fold> 
    public void deactivate(Plane p) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.CD817DAC-D864-E112-B7CA-DF8AF1330663]
    // </editor-fold> 
    public void deactivate(Seat s) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.FBDA796B-1F77-2A55-E29B-DFE676B0770B]
    // </editor-fold> 
    public void deactivate(Type t) throws RemoteException {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.AB198B57-2433-5014-E6CB-9CF014106561]
    // </editor-fold> 
    public Customer getCustomerByKey(int id) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4E9A96D0-B35F-9791-2F61-E0E56D8346BA]
    // </editor-fold> 
    public ArrayList<Customer> getCustomerByName(String lastname) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.93AB32C1-7844-2F2A-ABAC-BE1390B6C6E8]
    // </editor-fold> 
    public ArrayList<Flight> getAllFlightsOfCustomer(Customer c) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.8798E549-2CB0-B0EE-A349-E71C0934984C]
    // </editor-fold> 
    public ArrayList<Booking> getBookingsOfCustomer(Customer c) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4F6EFE71-771A-A505-AAB4-E8873FA7FE95]
    // </editor-fold> 
    public ArrayList<Booking> findBookingByDateTime(Date dateTime) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.CDE47A29-A993-D8C5-B0B4-EE5A4CD51198]
    // </editor-fold> 
    public ArrayList<Booking> findBookingByCustomerId(int id) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.28ED8C6E-CDF4-F446-7257-808ED798C22A]
    // </editor-fold> 
    public ArrayList<Booking> findBookingByKey(int id) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.49025D80-CA84-2EBF-2BE6-E82218DBDC7C]
    // </editor-fold> 
    public Flight findFlightByKey(int id) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4D5A42D4-DAE1-4F4C-9D00-27AE39436490]
    // </editor-fold> 
    public ArrayList<Flight> findFlightByDateTime(Date dateTime) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.FC8E97D4-2740-C062-2CA4-B02EBE5F1759]
    // </editor-fold> 
    public ArrayList<Flight> findFlightByPlane(Plane p) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0CBE373E-91B7-40AC-4F79-2C2CFD2E5889]
    // </editor-fold> 
    public ArrayList<Flight> findFlightByStartAirport(Airport a) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.AB7C349F-C663-B93D-6608-31A4910796A1]
    // </editor-fold> 
    public ArrayList<Flight> findFlightByStopAirport(Airport a) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.E4D0F236-BB43-DCDA-964C-2CD0FF374B32]
    // </editor-fold> 
    public Plane findPlaneByKey(int planeId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.05DB07E7-730B-8614-DEC2-D04A6D73CCCC]
    // </editor-fold> 
    public ArrayList<Plane> findPlaneByType(Type t) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.AD8BB97E-0D48-91E0-4B7F-E4A8DC1B266D]
    // </editor-fold> 
    public ArrayList<Plane> findPlaneByAirline(Airline a) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.6562926F-6C0A-3574-09BC-C7AA92B4AA6E]
    // </editor-fold> 
    public Seat findSeatByKey(int seatId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.4F3DE9DA-C502-17EF-DEF6-6DE304B132B9]
    // </editor-fold> 
    public Type findTypeByKey(int typeId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.DE34C2AD-8413-C788-6A49-22E5507A11E8]
    // </editor-fold> 
    public ArrayList<Type> findTypeByName(String name) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.48A12AE2-2AD3-1E9A-19AC-C4B3490DF49B]
    // </editor-fold> 
    public ArrayList<Type> findTypeBySeatsTotal(int seatsTotal) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.51B58DD4-9F2E-F319-0E71-E5361B58C77B]
    // </editor-fold> 
    public ArrayList<Airline> findAirlineByName(String name) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.7835FC50-77DB-A866-B11B-E62840C83404]
    // </editor-fold> 
    public ArrayList<Airline> findAirlineByInitials(String initials) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C6000336-4442-2F6D-C61A-0104237107D5]
    // </editor-fold> 
    public Airline findAirlineByKey(int airlineId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.C7D22DCC-2EEB-A9F1-6A20-C10F52502D59]
    // </editor-fold> 
    public Airport findAirportByKey(int airportId) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.93950DAA-D361-CF20-0F37-287DCB91374A]
    // </editor-fold> 
    public ArrayList<Airport> findAirportByName(String name) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.83C918F6-917C-0CD9-B670-C8B779181FAE]
    // </editor-fold> 
    public ArrayList<Airport> findAirportByInitials(String initials) throws RemoteException {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.043F7E46-6335-DD85-70F1-BD6DDFCB1555]
    // </editor-fold> 
    public ArrayList<Airport> findAirportByCity(String city) throws RemoteException {
        return null;
    }
}

